\(\int \cos (c+d x) (a+a \sec (c+d x))^{3/2} (B \sec (c+d x)+C \sec ^2(c+d x)) \, dx\) [369]
Optimal result
Integrand size = 40, antiderivative size = 105 \[
\int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 a^{3/2} B \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {2 a^2 (3 B+4 C) \tan (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 d}
\]
[Out]
2*a^(3/2)*B*arctan(a^(1/2)*tan(d*x+c)/(a+a*sec(d*x+c))^(1/2))/d+2/3*a^2*(3*B+4*C)*tan(d*x+c)/d/(a+a*sec(d*x+c)
)^(1/2)+2/3*a*C*(a+a*sec(d*x+c))^(1/2)*tan(d*x+c)/d
Rubi [A] (verified)
Time = 0.30 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.00, number of
steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {4157, 4002, 4000, 3859, 209,
3877} \[
\int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 a^{3/2} B \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{d}+\frac {2 a^2 (3 B+4 C) \tan (c+d x)}{3 d \sqrt {a \sec (c+d x)+a}}+\frac {2 a C \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}
\]
[In]
Int[Cos[c + d*x]*(a + a*Sec[c + d*x])^(3/2)*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]
[Out]
(2*a^(3/2)*B*ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]])/d + (2*a^2*(3*B + 4*C)*Tan[c + d*x])/(3*
d*Sqrt[a + a*Sec[c + d*x]]) + (2*a*C*Sqrt[a + a*Sec[c + d*x]]*Tan[c + d*x])/(3*d)
Rule 209
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])
Rule 3859
Int[Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[-2*(b/d), Subst[Int[1/(a + x^2), x], x, b*(C
ot[c + d*x]/Sqrt[a + b*Csc[c + d*x]])], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]
Rule 3877
Int[csc[(e_.) + (f_.)*(x_)]*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[-2*b*(Cot[e + f*x]/(
f*Sqrt[a + b*Csc[e + f*x]])), x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0]
Rule 4000
Int[Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_)), x_Symbol] :> Dist[c, In
t[Sqrt[a + b*Csc[e + f*x]], x], x] + Dist[d, Int[Sqrt[a + b*Csc[e + f*x]]*Csc[e + f*x], x], x] /; FreeQ[{a, b,
c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0]
Rule 4002
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_)), x_Symbol] :> Simp[(-b)
*d*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m - 1)/(f*m)), x] + Dist[1/m, Int[(a + b*Csc[e + f*x])^(m - 1)*Simp[a*c
*m + (b*c*m + a*d*(2*m - 1))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] &&
GtQ[m, 1] && EqQ[a^2 - b^2, 0] && IntegerQ[2*m]
Rule 4157
Int[((a_.) + csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(
x_)]^2*(C_.))*((c_.) + csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.), x_Symbol] :> Dist[1/b^2, Int[(a + b*Csc[e + f*x])
^(m + 1)*(c + d*Csc[e + f*x])^n*(b*B - a*C + b*C*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m,
n}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Rubi steps \begin{align*}
\text {integral}& = \int (a+a \sec (c+d x))^{3/2} (B+C \sec (c+d x)) \, dx \\ & = \frac {2 a C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 d}+\frac {2}{3} \int \sqrt {a+a \sec (c+d x)} \left (\frac {3 a B}{2}+\frac {1}{2} a (3 B+4 C) \sec (c+d x)\right ) \, dx \\ & = \frac {2 a C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 d}+(a B) \int \sqrt {a+a \sec (c+d x)} \, dx+\frac {1}{3} (a (3 B+4 C)) \int \sec (c+d x) \sqrt {a+a \sec (c+d x)} \, dx \\ & = \frac {2 a^2 (3 B+4 C) \tan (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 d}-\frac {\left (2 a^2 B\right ) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d} \\ & = \frac {2 a^{3/2} B \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {2 a^2 (3 B+4 C) \tan (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 d} \\
\end{align*}
Mathematica [A] (verified)
Time = 0.63 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.97
\[
\int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a \sec \left (\frac {1}{2} (c+d x)\right ) \sec (c+d x) \sqrt {a (1+\sec (c+d x))} \left (3 \sqrt {2} B \arcsin \left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right ) \cos ^{\frac {3}{2}}(c+d x)+2 (C+(3 B+5 C) \cos (c+d x)) \sin \left (\frac {1}{2} (c+d x)\right )\right )}{3 d}
\]
[In]
Integrate[Cos[c + d*x]*(a + a*Sec[c + d*x])^(3/2)*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]
[Out]
(a*Sec[(c + d*x)/2]*Sec[c + d*x]*Sqrt[a*(1 + Sec[c + d*x])]*(3*Sqrt[2]*B*ArcSin[Sqrt[2]*Sin[(c + d*x)/2]]*Cos[
c + d*x]^(3/2) + 2*(C + (3*B + 5*C)*Cos[c + d*x])*Sin[(c + d*x)/2]))/(3*d)
Maple [B] (verified)
Leaf count of result is larger than twice the leaf count of optimal. \(205\) vs. \(2(91)=182\).
Time = 0.33 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.96
| | |
method | result | size |
| | |
default |
\(\frac {2 B a \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (\sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sin \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\right ) \cos \left (d x +c \right )+\sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sin \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\right )+\sin \left (d x +c \right )\right )}{d \left (\cos \left (d x +c \right )+1\right )}+\frac {2 C a \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (5 \sin \left (d x +c \right )+\tan \left (d x +c \right )\right )}{3 d \left (\cos \left (d x +c \right )+1\right )}\) |
\(206\) |
| | |
|
|
|
[In]
int(cos(d*x+c)*(a+a*sec(d*x+c))^(3/2)*(B*sec(d*x+c)+C*sec(d*x+c)^2),x,method=_RETURNVERBOSE)
[Out]
2*B/d*a*(a*(1+sec(d*x+c)))^(1/2)*((-cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*arctanh(sin(d*x+c)/(cos(d*x+c)+1)/(-cos(d
*x+c)/(cos(d*x+c)+1))^(1/2))*cos(d*x+c)+(-cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*arctanh(sin(d*x+c)/(cos(d*x+c)+1)/(
-cos(d*x+c)/(cos(d*x+c)+1))^(1/2))+sin(d*x+c))/(cos(d*x+c)+1)+2/3*C/d*a*(a*(1+sec(d*x+c)))^(1/2)/(cos(d*x+c)+1
)*(5*sin(d*x+c)+tan(d*x+c))
Fricas [A] (verification not implemented)
none
Time = 0.28 (sec) , antiderivative size = 314, normalized size of antiderivative = 2.99
\[
\int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\left [\frac {3 \, {\left (B a \cos \left (d x + c\right )^{2} + B a \cos \left (d x + c\right )\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) + 2 \, {\left ({\left (3 \, B + 5 \, C\right )} a \cos \left (d x + c\right ) + C a\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{3 \, {\left (d \cos \left (d x + c\right )^{2} + d \cos \left (d x + c\right )\right )}}, -\frac {2 \, {\left (3 \, {\left (B a \cos \left (d x + c\right )^{2} + B a \cos \left (d x + c\right )\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - {\left ({\left (3 \, B + 5 \, C\right )} a \cos \left (d x + c\right ) + C a\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )\right )}}{3 \, {\left (d \cos \left (d x + c\right )^{2} + d \cos \left (d x + c\right )\right )}}\right ]
\]
[In]
integrate(cos(d*x+c)*(a+a*sec(d*x+c))^(3/2)*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")
[Out]
[1/3*(3*(B*a*cos(d*x + c)^2 + B*a*cos(d*x + c))*sqrt(-a)*log((2*a*cos(d*x + c)^2 - 2*sqrt(-a)*sqrt((a*cos(d*x
+ c) + a)/cos(d*x + c))*cos(d*x + c)*sin(d*x + c) + a*cos(d*x + c) - a)/(cos(d*x + c) + 1)) + 2*((3*B + 5*C)*a
*cos(d*x + c) + C*a)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c)^2 + d*cos(d*x + c))
, -2/3*(3*(B*a*cos(d*x + c)^2 + B*a*cos(d*x + c))*sqrt(a)*arctan(sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d
*x + c)/(sqrt(a)*sin(d*x + c))) - ((3*B + 5*C)*a*cos(d*x + c) + C*a)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*s
in(d*x + c))/(d*cos(d*x + c)^2 + d*cos(d*x + c))]
Sympy [F(-1)]
Timed out. \[
\int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out}
\]
[In]
integrate(cos(d*x+c)*(a+a*sec(d*x+c))**(3/2)*(B*sec(d*x+c)+C*sec(d*x+c)**2),x)
[Out]
Timed out
Maxima [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 998 vs. \(2 (91) = 182\).
Time = 0.46 (sec) , antiderivative size = 998, normalized size of antiderivative = 9.50
\[
\int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Too large to display}
\]
[In]
integrate(cos(d*x+c)*(a+a*sec(d*x+c))^(3/2)*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")
[Out]
1/2*((a*arctan2((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*(cos(1/2*arctan2(sin(
2*d*x + 2*c), cos(2*d*x + 2*c)))*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) - cos(1/2*arctan2(si
n(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c)))), (cos(2*d*x + 2*c
)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*(cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) +
1))*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c))) + sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c)
+ 1))*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c)))) + 1) - a*arctan2((cos(2*d*x + 2*c)^2 + sin(2*d*x
+ 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*(cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c)))*sin(1/2*arctan2
(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) - cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))*sin(1/2*a
rctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c)))), (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) +
1)^(1/4)*(cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x
+ 2*c))) + sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d
*x + 2*c)))) - 1) - a*arctan2((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*sin(1/2
*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)), (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*
c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + 1) + a*arctan2((cos(2*d*x + 2*c)^2 +
sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)), (
cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(
2*d*x + 2*c) + 1)) - 1))*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*sqrt(a) + 4*
(a*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c)
)) - (a*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c))) - a)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x
+ 2*c) + 1)))*sqrt(a))*B/((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*d)
Giac [F]
\[
\int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right )\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{\frac {3}{2}} \cos \left (d x + c\right ) \,d x }
\]
[In]
integrate(cos(d*x+c)*(a+a*sec(d*x+c))^(3/2)*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="giac")
[Out]
sage0*x
Mupad [F(-1)]
Timed out. \[
\int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \cos \left (c+d\,x\right )\,\left (\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2} \,d x
\]
[In]
int(cos(c + d*x)*(B/cos(c + d*x) + C/cos(c + d*x)^2)*(a + a/cos(c + d*x))^(3/2),x)
[Out]
int(cos(c + d*x)*(B/cos(c + d*x) + C/cos(c + d*x)^2)*(a + a/cos(c + d*x))^(3/2), x)